package com.ding.state;

/*
 * @author ding
 * @date 2021/10/27 17:07:29
 */

public class CloseDoorState extends State {
    @Override
    public void stop() {
        super.context.setState(new StopState());
        super.context.getState().stop();
    }

    @Override
    public void rise() {
        super.context.setState(new RiseState());
        super.context.getState().rise();
    }

    @Override
    public void down() {
        context.setState(new DownState());
        context.getState().down();
    }

    @Override
    public void openDoor() {
        context.setState(new OpenDoorState());
        context.getState().openDoor();
    }

    @Override
    public void closeDoor() {
        System.out.println("关门");
    }
}
